package com.shop.cloud.controller.hongfu;

import io.swagger.annotations.ApiOperation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.shop.cloud.common.mybatis.BaseController;
import com.shop.cloud.domain.hongfu.StartupPage;
import com.shop.cloud.filter.CurrentUserId;
import com.shop.cloud.filter.IgnoreAuth;
import com.shop.cloud.model.response.ObjectDataResponse;
import com.shop.cloud.service.hongfu.impl.StartupPageService;

/**
 * 获取门店信息
 * 
 * @author xusai
 *
 */
@RestController
@RequestMapping(value = "api")
public class StartUpPageController extends BaseController {
	@Autowired
	private StartupPageService startupPageService;
	
	@IgnoreAuth
	@ApiOperation(value = "获取启动页列表", notes = "获取启动页列表")
	@RequestMapping(value = "/startupPageList", method = RequestMethod.POST)
	@ResponseBody
	public ObjectDataResponse<List<StartupPage>> startupPageList(@CurrentUserId Long userId,@RequestBody StartupPage startupPage) {
		startupPage.setStatus(0);
		startupPage.setOrderBy("STARTUP_PAGE.create_time DESC");
		List<StartupPage> pageList = startupPageService.find(startupPage);
		return new ObjectDataResponse<List<StartupPage>>(pageList);
	}

}
